package com.wsd.jing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wsd.jing.entity.UserRole;
import com.wsd.jing.dto.UserRoleDTO;
import com.wsd.jing.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * All rights Reserved, Designed By www.tom.com
 *
 * @author tom
 * @version 1.0.0
 * @projectName: jing
 * @packageName: com.wsd.jing.mapper
 * @className: UserRoleMapper
 * @description: 用户角色关联Mapper接口
 * @createDate 2022-11-14 07:02
 * @copyright 2022-11-14 07:02 www.tom.com Inc. All rights reserved.
 */
@Mapper
public interface UserRoleMapper extends BaseMapper<UserRole> {

    /**
     * @param page:分页参数
     * @param userRoleQuery:用户角色查询参数
     * @return IPage<User>
     * @author tom
     * @description 分页查询角色关联用户
     * @createDate 2022/11/27 17:06
     */
    IPage<User> listPageUserRoles(IPage<?> page, @Param("userRoleQuery") UserRoleDTO userRoleQuery);

    /**
     * @param page:分页参数
     * @param userRoleQuery:用户角色查询参数
     * @return IPage<User>
     * @author tom
     * @description 分页查询角色可选用户
     * @createDate 2022/12/4 14:51
     */
    IPage<User> listPageUsers(IPage<?> page, @Param("userRoleQuery") UserRoleDTO userRoleQuery);
}
